package STUDENT.TRINHQUANGXUANDUC.OPPS.baitapmang.bai2;

import java.util.Scanner;

public class Views {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[100];
		int so = 0;
		int i = 0;
		int loaimang;
		Controllers avControllers = new Controllers();
		System.out.println("Chon kieu du lieu mang 1.Int/2.Double");
		loaimang = sc.nextInt();
		if (loaimang == 1) {
			System.out.println("Nhap cac phan tu mang(Ket thuc nhap so am): ");
			while (so >= 0) {
				so = sc.nextInt();
				array[i] = so;
				i++;
				sc = new Scanner(System.in);

			}
			avControllers.tinh(array);
		}
		if (loaimang == 2) {
			double[] arraydouble = new double[100];
			double pt = 0;
			System.out.println("Nhap cac phan tu mang(Ket thuc nhap so am): ");
			while (pt >= 0) {
				pt = sc.nextDouble();
				arraydouble[i] = pt;
				i++;
				sc = new Scanner(System.in);

			}
			avControllers.tinh(arraydouble);
		}
	}
}
